<template>
  <div>
    <button @click="getContent">点我</button>
    <div>{{ content }}</div>
  </div>
</template>

<script>
import axios from "axios";

export default {
  data: function () {
    return {
      content: "",
    };
  },
  methods: {
    async getContent() {
      const res = await axios.get("/api/get_hello_world");
      if (res?.data) {
        this.content = res.data.content;
      }
    },
  },
};
</script>

<style scoped lang="stylus"></style>
